//
//  ViewController.m
//  TestAispeech
//
//  Created by shaowei on 13-9-3.
//  Copyright (c) 2013年 LianZhan. All rights reserved.
//

#import "ViewController.h"
#import "AudioVerifyPwdViewController.h"
#import "AudioFaceViewController.h"
#import "FaceVerifyViewController.h"

@interface ViewController ()

@property (nonatomic,retain) NSArray *arrayOfTableView;

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
    self.arrayOfTableView = @[@"语音识别 身份验证",
                              @"人脸识别 身份验证",
                              @"声音密码+人脸验证"];
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc {
    [_arrayOfTableView release];
    [_tableView release];
    [super dealloc];
}
- (void)viewDidUnload {
    [self setTableView:nil];
    [super viewDidUnload];
}

#pragma mark - UITableViewDataSource

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [_arrayOfTableView count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellIdentifier = @"normal_cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    
    cell.textLabel.text = [_arrayOfTableView objectAtIndex:indexPath.row];
    
    return cell;
}

#pragma mark - UITableViewDelegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    NSString *vcString = nil;
    switch (indexPath.row) {
        case 0:{
            vcString = @"AudioVerifyPwdViewController";
        }
            break;
        case 1:{
            vcString = @"FaceViewController";
        }
            break;
        case 2:{
            vcString = @"AudioFaceViewController";
        }
            break;
            
        default:
            NSAssert(0, @"tableview index  超出界限");
            break;
    }
    
    [self  performSegueWithIdentifier:vcString sender:nil];
}





@end
